package com.example.redisDemo.test;

public class Date {
	private int month;
	private int day;
	private int year;
	
	public Date(int month,int day,int year)
	{
		setMonth(month);
		setDay(day);
		setYear(year);
	}
	
	public void setMonth(int month)
	{
		this.month=month;
	}
	public void setDay(int day)
	{
		this.day=day;
	}
	public void setYear(int year)
	{
		this.year=year;
	}
	
	public int getMonth()
	{
		return this.month;
	}
	
	public int getDay()
	{
		return this.day;
	}
	public int getYear()
	{
		return this.year;
	}
	
	@Override
	public boolean equals(Object obj)
	{
		if(this==obj)
			return true;
		if(obj==null)
			return false;
		if(this.getClass()!=obj.getClass())
			return false;
		Date next=(Date)obj;
		if(this.month==next.month&&this.day==next.day&&this.year==next.year)
			return true;
		else {
			return false;
		}
	}
}
